#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_wofm2opl=$BinDir/wofm2opl$ExeExt
_wopl2ofm=$BinDir/wopl2ofm$ExeExt
_wovf2ovp=$BinDir/wovf2ovp$ExeExt
_wovp2ovf=$BinDir/wovp2ovf$ExeExt

tests=omegaware/tests

test -d $tests || mkdir -p $tests
rc=0

TEXMFCNF=$srcdir/../kpathsea
OFMFONTS=$srcdir/$tests
export TEXMFCNF OFMFONTS

echo && echo "*** ofm2opl badofm badofm"
$_wofm2opl $srcdir/$tests/badofm omegaware/badofm && rc=1

echo && echo "*** opl2ofm badopl badopl"
$_wopl2ofm $srcdir/$tests/badopl omegaware/badopl && rc=2

echo && echo "*** ovf2ovp badovf badovf badovf"
$_wovf2ovp $srcdir/$tests/badovf $srcdir/$tests/badovf omegaware/badovf && rc=3

echo && echo "*** ovp2ovf badovp badovp"
$_wovp2ovf $srcdir/$tests/badovp omegaware/badovp && rc=4

exit $rc
